package com.czxy.demo14;

public class Test01 {
    public static void main(String[] args) {


        int a = getCharNum('s');
        System.out.println(a);

    }
    public static int getCharNum(char c){
        String s = "this is a test of java";
        int count = 0;
        char[] chars = s.toCharArray();
        for (char aChar : chars) {
            if (aChar == c){
                count++;
            }
        }
        String[] split = s.split(" ");
        System.out.println(split[3]);

        String re = s.replace("java", "JAVASE");
        System.out.println(re);
        return count;
    }
}
